<template>
	<view class="bi-order-memo-badge" v-if="orderMemoCount">{{ orderMemoCount }}</view>
</template>

<script>
import { getOrderMemoCount } from '@/apis/order.js'
import { buildUrl } from '@/utils/url.js'

export default {
	name: 'BiOrderMemoFloat',
	created () {
		this.getMemoCount()
	},
	data () {
		return {
			orderMemoCount: 0
		}
	},
	methods: {
		getMemoCount () {
			this.loading = true
			getOrderMemoCount().then(rs => {
				this.orderMemoCount = rs
			}).finally(() => {
				this.loading = false
			})
		},
		reload () {
			this.getMemoCount()
		}
	}
}
</script>

<style lang="less">
.bi-order-memo-badge{
	height: 18px;
	line-height: 18px;
	font-size: 12px;
	min-width: 6px;
	text-align: center;
	color: #fff;
	background-color: #F45662;
	padding: 0 6px;
	border-radius: 10px;
}
</style>